﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkflowCore.Interface;

namespace IM.Easy.Workflow.WorkflowDefine.Demo
{
    public class DemoWf : IWorkflow
    {
        public string Id => "demo";
        public int Version => 1;

        public void Build(IWorkflowBuilder<object> builder)
        {
            builder
                .StartWith<DemoHelloStep>()
                .WaitFor("approve", (data, context) => context.Workflow.Id)
                .Then<DemoByeStep>()
                .EndWorkflow();
        }
    }
}
